import Request from '../js/request'
import apiUrl from '../js/apiUrl'

const API = new Request(apiUrl.single)

/**
 * 获取单聊未读离线
 */
export function GetSingleOfflineList (param) {
  return API.headersGet('offline/web', param)
}

// 获取单聊离线数据
export function GetSingleHistoryList (param) {
  return API.get('singleHistory', param)
}
// roomId=882559280408952904&lastMsgId=885493022807031886&pageSize=10

/**
 修改单聊消息为已接收(web)
 * @param param  请求示例
 * {
    "ids":[
        884845395451052116,884845765468356719
    ]
}
 * @returns {Promise | Promise<unknown>}
 * @constructor
 */
export function UpdateSingleReceiver (param) {
  // return null
  return API.post('offline/updateReceiver', param)
}
